<!DOCTYPE html>
<html lang="zh-cn">
<head>
	<meta charset="UTF-8">
	<title>Member-Login</title>
</head>
<body>
	<form action="#">
		账号：<input type="text" id="account">
	    密码：<input type="password" id="password">
	    <input type="checkbox" name ="member">是否注册为会员？		
	    <button onclick="clickme()">登录</button>
	</form>
</body>
<script>
	function clickme() {
		var account;
		var password;
		var ismember;
		account = document.getElementById('account').value;
		password = document.getElementById('password').value;
		ismember = document.getElementsByName('member');
		// console.log(ismember);
		if (account == password ) {
			alert("登录成功！");
			if (ismember[0].checked == true) {
				alert("欢迎您注册为会员");
			}
		} else {
			alert("登录失败！");
		}
	}
</script>
</html>